//
//  LPPAllLotteryController.m
//  Lottery
//
//  Created by 刘盼 on 16/1/22.
//  Copyright © 2016年 lhheh. All rights reserved.
//

#import "LPPAllLotteryController.h"

@interface LPPAllLotteryController ()

@property(nonatomic,strong)UIView *blueView;
@end

@implementation LPPAllLotteryController

-(UIView *)blueView{
    if (!_blueView) {
        
        _blueView = [[UIView alloc]initWithFrame:CGRectMake(0, 64, [UIScreen mainScreen].bounds.size.width, 0)];
        
        _blueView.backgroundColor = [UIColor blueColor];
        
        [self.view addSubview:_blueView];
        
    }
    return _blueView;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self blueView];
}
- (IBAction)allLotteryBtnClick:(UIButton *)sender {
    
    [UIView animateWithDuration:1.2 animations:^{
      
        sender.imageView.transform = CGAffineTransformRotate(sender.imageView.transform, M_PI);
        
        CGRect frame = self.blueView.frame;
        
        frame.size.height = frame.size.height ? 0 : 400;
        
        self.blueView.frame = frame;
    }];
}


@end
